package Test.week1.Utils;

import java.text.DecimalFormat;
import java.util.Random;

public class RandomNum {
    static Random random =new Random();
    public static int getNum(){
        int id = (random.nextInt(27));
        return id;
    }
    public static String getStartTime(){
        int day = (random.nextInt(30)) + 1;
        DecimalFormat df=new DecimalFormat("00");//设置格式
        String str=df.format(day);//格式转换
        return "2018-11-"+str;
    }
    public static String getCallLong(){
        int time=(random.nextInt(7200)+1);
        DecimalFormat df=new DecimalFormat("0000");//设置格式
        String str=df.format(time);//格式转换
        return str;
    }
}
